﻿@model ApplicationUser

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
        
    <div class="form-horizontal">
        <h4>ApplicationUser</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })

        @Html.EditorFor(x => x.UserName)

        @Html.EditorFor(x => x.Email)

        @Html.EditorFor(x => x.LockoutEnabled)

        @* or this
            @Html.EditorFor(x => x.EmailConfirmed)*@

        @* Hvordan!?!
            @Html.ListBoxFor(x => x.Roles, new SelectList(Model.Roles, "UserId", "RoleId"))
        *@

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Gem" class="btn btn-default">
                &nbsp;
                @Html.ActionLink("Slet", "Delete", new { id = Model.Id }, new { @class = "btn btn-danger" })
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

